package com.hmy.finance.dal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmy.finance.dal.po.DeviceDailyBillPo;
import com.hmy.finance.dal.po.ContractEarliestRentalPo;
import com.hmy.finance.dal.po.DeviceDailyBillTimeQueryPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author songkf
 * @description 针对表【device_daily_bill(设备日费用账单流水)】的数据库操作Mapper
 * @createDate 2024-02-21 18:55:01
 * @Entity com.hmy.finance.dal.po.DeviceDailyBillPo
 */
public interface DeviceDailyBillMapper extends BaseMapper<DeviceDailyBillPo> {

    int insertBatch(@Param("list") List<DeviceDailyBillPo> deviceDailyBillPoList);

    List<DeviceDailyBillPo> selectDeviceBillsByDeviceNoAndContractNo(@Param("list") List<DeviceDailyBillTimeQueryPo> list);

    List<DeviceDailyBillPo> selectListByContractIdAndDeviceId(@Param("list") List<DeviceDailyBillTimeQueryPo> list);

    List<DeviceDailyBillPo> selectEarliestRecordsByDeviceRentalRecordIds(@Param("list") List<Long> deviceRentalRecordIds);

    List<ContractEarliestRentalPo> selectEarliestRecordsByContractIds(@Param("list") List<Long> contractIds);


    int batchUpdateOffsetResult(@Param("infoList") List<DeviceDailyBillPo> waitOffsetDeviceDailyBillInfoList);
}




